-
Notifications
You must be signed in to change notification settings - Fork 330
Add a separate file for plugin logs #8253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
At the moment, this is the output in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
@@ -1,5 +1,6 @@ | |||
<component name="ProjectRunConfigurationManager"> | |||
<configuration default="false" name="flutter-intellij [runIde]" type="GradleRunConfiguration" factoryName="Gradle"> | |||
<log_file alias="flutter" path="$PROJECT_DIR$/build/idea-sandbox/AI-AI-251.23774.16.2511.13338727/log/flutter.log" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be checked in? Will it be the same for everyone? Or is this specific to the build you have on your machine?
catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
System.setProperty("java.util.logging.SimpleFormatter.format", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Odd that you can't set format properties programmatically. (I see you can use a logging properties file but that's no better.)
Anyway: odd!
This adds a new class
PluginLogger
that prints log messages to a separateflutter.log
file. Log messages will continue to print toidea.log
also becausePluginLogger
has a parent logger that continues to log there.The built in
FileHandler
class manages writing to the file and removing old lines if the file gets too big.